#include"optsrc.hpp"

unsigned char cmdon[7] = { 0x40, 0x05, 0x01, 0x00, 0x2A, 0xFF, 0x01 };
unsigned char cmdoff[7] = { 0x40, 0x05, 0x01, 0x00, 0x2A, 0xFF, 0x00 };

int main(int argc, char **argv) {
    optsrc usbLight;
#if 0
    // make it blink
    for(int i = 0; i < 3; i++) {
        usbLight.Allon();
        usleep(1000); /* 1000 microsecond */
        usbLight.Alloff();
    }
#endif
#if 1
    for(int i = 0; i < 3; i++) {
        usbLight.Write(cmdon, 7);
        usleep(1000); /* 1000 microsecond */
        usbLight.Write(cmdoff, 7);
    }
#endif
    return 0;
}
